package com.xyx.yfy_site_msg.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xyx.yfy_site_msg.system.entity.YfyCustomer;
import com.xyx.yfy_site_msg.system.entity.YfyDataEntity;
import com.xyx.yfy_site_msg.system.entity.YfySite;
import com.xyx.yfy_site_msg.system.mapper.YfySiteMapper;
import com.xyx.yfy_site_msg.system.service.YfySiteService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author xyx
 * @since 2020-11-11
 */
@Service
@Transactional
public class YfySiteServiceImpl extends ServiceImpl<YfySiteMapper, YfySite> implements YfySiteService {


    @Override
    public void removeSiteByCustomerName(@Param("customerName") String customerName) {
        this.getBaseMapper().removeSiteByCustomerName(customerName);
    }

    @Override
    public List<YfyDataEntity> loadSubmit(@Param("month") String month) {
        return this.getBaseMapper().loadSubmit(month);
    }

    @Override
    public List<YfyDataEntity> loadUpdate(@Param("month") String month) {
        return this.getBaseMapper().loadUpdate(month);
    }

    @Override
    public List<YfySite> loadSiteByUserType() {
        return this.getBaseMapper().loadSiteByUserType();
    }






    /*-----------------重写客户档案的crud方法切入缓存开始------------------*/

    @Override
    public boolean updateById(YfySite site) {
        return super.updateById(site);
    }

    @Override
    public boolean save(YfySite site) {
        return super.save(site);
    }

    @Override
    public boolean removeById(Serializable id) {
        return super.removeById(id);
    }
    /*-----------------重写客户档案的crud方法切入缓存结束------------------*/
}
